package com.gss.datasource.mapper.sys;

import com.gss.common.core.mapper.IBaseMapper;
import com.gss.entity.sys.dto.SysMenu;
import com.gss.entity.sys.dto.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author DYang
 * @date 2023/6/17
 */
public interface SysMenuMapper extends IBaseMapper<SysMenu> {

    /**
     * 根据角色id获取权限
     * @param roleIdList
     * @return
     */
    List<SysMenu> listMenuEnableByRoleId(@Param("roleIdList") List<Integer> roleIdList);

    /**
     * 根据角色code获取目录资源
     * @param roleList
     * @return
     */
    List<SysMenu> listMenuEnableByRoleCode(@Param("roleList") List<String> roleList);
}
